package jmind.core.serialize;

import java.io.IOException;

/**
 * description: https://topic.atatech.org/articles/115575
 * https://www.cnblogs.com/lgjlife/p/10731099.html
 * 性能 ProtostuffSerializer > JSONSerializer > KryoActualSerializer > KryoSerializer >HessianSerializer >JdkSerializer > AliHessianSerializer
 * List大小  小->大  JdkSerializer > KryoActualSerializer > KryoSerializer > AliHessianSerializer | HessianSerializer > ProtostuffSerializer > JSONSerializer
 * 普通对象大小  小->大 ProtostuffSerializer > JSONSerializer >KryoActualSerializer > KryoSerializer > HessianSerializer |AliHessianSerializer > JdkSerializer
 * @author weibo.xie
 * @date : create in 5:00 下午 2021/5/13
 */
public interface Serializer {

    byte[] serialize(Object object) throws IOException;

    Object deserialize(byte[] bytes) throws Exception;
}
